package ThisPractise;

public class BoyTest {
    public static void main(String[] args) {
        Boy b1=new Boy("杰克",24);
        Girl g1=new Girl("肉丝",22);
        g1.marry(b1);
        b1.shout();
        System.out.println("\n");
        b1.setAge(10);
        b1.shout();
        Girl g2=new Girl("爱丽丝",25);
        if(g1.compare(g2)<0){
            System.out.println(g1.getName()+"年龄小一点");
        } else if (g1.compare(g2)>0) {
            System.out.println(g1.getName()+"年龄大一点");
        }else {
            System.out.println("两人年龄一样");
        }

    }

}
